package me.haoliang

/**
  * author: planck
  * createTime: 2016/10/25.
  */
object Variable {
  def main(args: Array[String]): Unit = {
    val a = 1;
    val b = if (a == 1) 4 else 2
    println(b)

    val c = {
      (a, b) match {
        case (1, 2) =>
          1
        case (1, 4) =>
          2
        case (_, _) =>
          3
      }
    }
    println(c)
  }

}
